#ifndef HOLLOWFEATURE_H
#define HOLLOWFEATURE_H
/*
挖空运算存储挖空Id、厚度、容差、目标对象、结果Id、对象删除面集合等
*/
#include "BaseFeature.h"
#include <RWTools.h>
class HollowFeature : public BaseFeature {
public:
	HollowFeature();
	~HollowFeature();

public:
	//获取私有变量
	int getHollowId();
	double getHollowD();
	double getHollowTolerance();
	int getResultId() override;
	BaseFeature* getTargetFeature() override;
	std::list<int> getSubFaceIndexs();
	int getSubShapeIndexByIndex(int index);

	//设置私有变量
	void setHollowId(int hollowId);
	void setHollowD(double d);
	void setHollowTolerance(double tolerance);
	void setResultId(int resultId);
	void setTargetFeature(BaseFeature* targetFeature);
	void addSubShapeIndex(int index);
	void AddOperation(BaseFeature* feature) override {
		if (this->targetFeature->getFeatureType() <= 5) {
			this->targetFeature->AddOperationToList(feature);
		}
		else {
			this->targetFeature->AddOperation(feature);
		}
	};
private:
	int hollowId;
	int resultId;
	double d;
	double tolerance;
	//选择挖空对象删除面list
	std::list<int> subFaceIndexs;
	
	//保存挖空运算前父对象的拓扑数据
	//判断对象是否是不规则对象（即是操作子类），若是则先重做操作获取不规则对象
	BaseFeature* targetFeature;
};
#endif

